package com.nut.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.nut.common.BaseEntity;
import lombok.Data;

import java.util.List;

@Data
@TableName("mall_order")
public class Order extends BaseEntity {

    @TableId(type = IdType.ASSIGN_UUID)
    private Long id;

    //会员Id
    private Long memberId;

    //订单总金额
    private Integer money;

    //实际支付金额
    private Integer payMoney;

    //已退款金额
    private Integer refund;

    //订单状态 0未支付 1已取消 2已支付 3已发货 4申请退款 5退款失败  6已结单
    private Integer status;

    //取消订单原因
    private String reason;

    //具体商品列表
    private transient List<OrderGoods> goods;

    // 支付信息
    @TableField(exist = false)
    private OrderPayInfo orderPayInfo;
}
